<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/displaytag.tld" prefix="display"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="<%= request.getContextPath() + "/css/bloques.css" %>"
	rel="stylesheet" type="text/css">
<title>Activar Subprogramas</title>

<script type="text/javascript">
      function fboton(){
      document.frmActivarSubprograma.activar.disabled = false;
      }
    </script>
</head>
<body>
	<P></P>
	<P></P>
	<table cellspacing="2" cellpadding="1" border="0" width="80%"
		align="center">
		<tr>
			<td>
				<DIV align="center" class="titulosenblanco">ACTIVAR BENEFICIOS</DIV>
			</td>
		</tr>
	</table>
	<P align="center"></P>
	<form name="frmActivarSubprograma"
		action="<%=request.getContextPath()+"/admin/tile/ActivarCorrectaSubprograma.jsp"%>">
		<div align="center">
			<table class="tablaGenericaWidth90">
				<tr>
					<td><logic:notPresent scope="request" name="subprogramas">
							<DIV align="center"><%=request.getAttribute("msg")%></DIV>
						</logic:notPresent> <logic:present scope="request" name="subprogramas">
							<%
            int i = 0;
            int cont = 0;
            %>

							<display:table name="requestScope.subprogramas"
								class="bordesTable" id="subpro" cellpadding="3" cellspacing="1"
								style="width:100%"
								requestURI='<%=request.getContextPath()+"/subprogramas/ActivarSubprogramas.do"%>'>
								<display:column headerClass="headerTable" title="Beneficio"
									class="Numero" sortable="true">
									<bean:write name="subpro" property="nombre" />
								</display:column>
								<display:column headerClass="headerTable"
									title="Programa al que pertenece" class="Numero"
									sortable="true">
									<bean:write name="subpro" property="nombrePrograma" />
								</display:column>

								<bean:define id="Codigo" name="subpro" property="code"></bean:define>
								<display:column headerClass="headerTable" title="Activar"
									class="Numero" sortable="false">
									<input type="checkbox" onclick="fboton()" name="Activar<%=i%>"
										value="<%=Codigo%>" />
									<%i++;
            cont++;%>
								</display:column>
							</display:table>
							<input type="HIDDEN" name="cont" value="<%=cont%>">
						</logic:present></td>
				</tr>
			</table>
		</div>
		<table cellspacing="2" cellpadding="1" border="0" width="80%"
			align="center">
			<tr>
				<td>
					<DIV align="center">
						<logic:notPresent scope="request" name="subprogramas">
							<input type="submit" name="activar" value="Activar"
								disabled="disabled" />
						</logic:notPresent>
						<logic:present scope="request" name="subprogramas">
							<input type="submit" name="activar" value="Activar"
								disabled="disabled" />
						</logic:present>
					</DIV>
				</td>
			</tr>
		</table>
		<table cellspacing="1" cellpadding="2" border="0" width="80%"
			align="center">
			<tr>
				<td>
					<div align="center">
						<a
							href="<%=request.getContextPath() + "/subprogramas/ConsultarSubprograma.do"%>">
							<img
							src="<%= request.getContextPath() + "/images/BACK1-1.gif" %>"
							width="16" height="16" border="0">
						</a>
					</div>
				</td>
			</tr>
		</table>
		<P></P>
		<P>
			<%
            if(session.getAttribute("mensajes") != null){
              out.println((String)session.getAttribute("mensajes"));
            }
              session.removeAttribute("mensajes");
        %>
		</P>
		<P align="center"></P>
		<P align="center"></P>
	</form>
	<P align="center"></P>
</body>
</html>
